package com.example.orderstoremes.module.common.controller;

import com.example.orderstoremes.common.base.CrudController;
import com.example.orderstoremes.core.config.properties.MinioProperties;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 通用请求处理
 *
 * @author crud
 */
@Slf4j
@Controller
@RequestMapping("/common")
@RequiredArgsConstructor
public class CommonController extends CrudController {

    private final MinioProperties minioProperties;


    private static final String SUFFIX = "common";

    /**
     * 跳转到树结构向导页
     *
     * @return 树结构向导页
     */
    @GetMapping("/treePage")
    public String treePage(String url, ModelMap map) {
        map.put("url", url);
        return SUFFIX + "/tree";
    }


}
